申请复制表数据
请求地址
/v2/webservice/apply/merge-table-data
请求方法
Post
请求参数说明
| 参数名称 | 类型 | 是否必填 | 说明 |
|---|
| app_id | number | 是 | 项目ID |
| tables | Tables数组 | 是 | |
| auto_check | bool | 否 | 是否自动审核。(默认跟随集群配置),当集群设置为自动审核的时候,才能设置为true |
| auto_execute_task | boolean | 否 | 默认跟随集群, 集群开启自动执行的时候,才能支持设置为true。 |
| attention_man | string[] | 否 | 关注人/协作人, 允许其他开发角色执行此单据生成的任务,(不需要指定项目管理员为关注人, 因为项目管理员本身就拥有执行任务的权限) |
Tables
| 参数名称 | 类型 | 是否必填 | 说明 |
|---|
| src_zone_id | number | 是 | 源区ID |
| dest_zone_id | number | 是 | 目标区ID |
| table_names | string[] | 是 | 表名 |
示例
{
"app_id": 5,
"tables":[{
"src_zone_id":6,
"dest_zone_id":105,
"table_names":["ListTableDemo", "pb2_webclient_sortlist"]
}
]
}
返回参数说明
| 参数名称 | 类型 | 说明 |
|---|
| check_result | | |
| app_id | | |
| apply_list | | |
| task_list | | |
| |
成功返回
{
"code": 0,
"request_id": "a2a8cc51-8b04-441a-834a-e5d29f5f5961",
"data": {
"check_result": 0,
"app_id": 5,
"apply_list": [
{
"apply_id": 19037,
"apply_type_text": "复制表数据",
"zone_id": "6",
"app_id": 5,
"table_name": "ListTableDemo",
"execute_status": 0,
"table_type": 1,
"tdr": "886",
"apply_type": 7
},
{
"apply_id": 19038,
"apply_type_text": "复制表数据",
"zone_id": "6",
"app_id": 5,
"table_name": "pb2_webclient_sortlist",
"execute_status": 0,
"table_type": 1,
"tdr": "883,884,885",
"apply_type": 7
}
],
"task_list": [],
"apply_user": "v_demo",
"check_user": "v_demo",
"apply_begin_time": "2023-01-16 14:54:16",
"apply_finishi_time": "2023-01-16 14:54:17",
"check_finish_time": "2023-01-16 14:54:17",
"msg": "提交申请成功, 请查看审核结果或任务执行状态",
"execute_task_user": "v_demo"
}
}
失败返回
{
"request_id": "2ed89e27-dbee-4514-9a00-0c269e101318",
"code": 102,
"message": "存在冲突的单据, 请先处理掉这些单据",
"debug_message": [
{
"apply_id": 19039,
"apply_type_text": "复制表数据",
"zone_id": "6",
"app_id": 5,
"table_name": "ListTableDemo",
"execute_status": 0,
"table_type": 1,
"tdr": "886",
"apply_type": 7
},
{
"apply_id": 19040,
"apply_type_text": "复制表数据",
"zone_id": "6",
"app_id": 5,
"table_name": "pb2_webclient_sortlist",
"execute_status": 0,
"table_type": 1,
"tdr": "883,884,885",
"apply_type": 7
}
]
}